/*
 * @Author: your name
 * @Date: 2022-01-21 17:16:23
 * @LastEditTime: 2022-04-18 16:39:01
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \my-app\src\page\container\Container.tsx
 */
import React, { FC } from 'react'
import { Button } from 'antd'
import { useAppSelector, useAppDispatch } from '@/store/hooks'
import { sub, SUB_TYPE } from '@/store/action'
interface Props {}

const Container: FC<Props> = () => {
	const total = useAppSelector(store => store.user.total)
	const dispatch = useAppDispatch()
	return (
		<div className='container-app w-px'>
			<Button
				type='primary'
				onClick={() => {
					dispatch(sub({ type: SUB_TYPE, data: 100 }))
				}}>
				增加
			</Button>
			{total}
		</div>
	)
}

export default Container
